package hottargui.domain;


/**
 * Responsibilitys:
 * 
 * a) Keep track of the player in turn
 * b) Turn card on tribe card deck. The state must be in
 *  but only ifState.endTurn, State.endRound state or
 *  State.newGame.
 *  
 */
public interface RoundSequenceStrategy {

	/** turn a card on the tribecard deck. This is equal to signal
	 * that it is the next player that should start his/her turn.
	 * @return PlayerColor the color of the player that is now in turn.
	 * @throws IllegalActionException a runtime exception is thrown if
	 * the game is not in the State.endTurn, State.endRound state or
	 * State.newGame state..
	 */
	public PlayerColor turnCard();

	/** return the player that is "in turn".
	 * @return the player instance of the player that may perform actions on
	 * game instance. Null is returned in case the game is in newGame state.
	 * For game states endTurn and endRound it should return the player
	 * that last executed an action.
	 */
	public Player getPlayerInTurn();



	/**
	 * If the gamevarient uses a deck of cards to determine the round sequense, the
	 * deck can be set with this method. If the gamevarient dosn't use a deck
	 * the to the method will be ignored.
	 * @param deck the deck of card to be used to determine player sequense and round
	 * 
	 */	  
	public void setDeckOfCards(DeckOfCards deck);


	/**
	 * If a gamevariant uses a deck and the deck is createt on the bases of the facevalue of a dice
	 * this metod returns the value of that dice-throw. If a gamevarient dosn't use a deck of cards
	 * based on the previous mentioned principle this mehod will return -1.  
	 * @return the facevalue of a dice on witch the current deck or -1 if no deck is used 
	 * 
	 */  
	public int getCurrentDeckBasedDiceValue();


	/**
	 * To syncronize objects having a reference to a deck. Call this method
	 * TODO: Implement this in an object server
	 * @param deck a deck of cards
	 */
	public void doUpdateDeck(DeckOfCards deck);



}
